package com.eliza.library.data.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.eliza.library.data.model.UserResource
import kotlinx.serialization.Serializable


@Entity(tableName = "users")
data class UserEntity(
    @PrimaryKey(autoGenerate = true) val id: Int,
    @ColumnInfo(name = "name") val name: String,
    @ColumnInfo(name = "alia") val alia: String,
)

fun UserEntity.asExternalModel() = UserResource(
    id = id,
    name = name,
    alia = alia
)
